DECLARE @value integer, @result INTEGER;
EXECUTE @result= xp_instance_regread
	@rootkey	= N'HKEY_LOCAL_MACHINE',
	@key		= N'SOFTWARE\Microsoft\Microsoft SQL Server\SQLServerAgent',
	@value_name	= N'MsxEncryptChannelOptions',
	@value		= @value OUTPUT
SELECT Result=@result, Value=@value
